package gptma.fo.cdi;

import javax.enterprise.event.Observes;
import javax.enterprise.inject.spi.AfterBeanDiscovery;
import javax.enterprise.inject.spi.BeanManager;
import javax.enterprise.inject.spi.Extension;

/**
 * 
 * @author xcl
 * @see http 
 *      ://www.verborgh.be/articles/2010/01/06/porting-the-viewscoped-jsf-annotation
 *      -to-cdi/
 */
public class ViewContextExtension implements Extension {

	public void afterBeanDiscovery(@Observes AfterBeanDiscovery event,
			@SuppressWarnings("unused") BeanManager beanManager) {
		event.addContext(new ViewContext());
	}
}
